<template>
  <div class="info-1200 highwayDetail-content">
        <div class="wy-main-title wy-m-t-20">
            <p>
              <nuxt-link to="./../info/index">首页</nuxt-link> /  物流运输  /  {{lineTypeText(detail.lineType)}}  /   <span>{{detail.beginPlace}}——{{detail.endPlace}}</span>
            </p>
        </div>
          <!-- 分割线 -->
          <div class="tender-detail">
                <div class="tender-city">
                    <div class="high-title">
                            <h3>{{detail.beginPlace}}——{{detail.endPlace}}</h3>
                            <div class="high-time">
                              <span>发布时间：{{detail.updateTime}}</span>
                              <span>浏览量:{{detail.lookNums || 0}}次</span>
                            </div>
                    </div>
                    <!-- 航空运输 -->
                    <div class="air-content"  v-if="detail.lineType == 3">
                          <!-- 日期 -->
                          <div class="air-left-time">
                              <span>{{dateTypeTime(detail.fromTime,'MM:DD') }}</span>
                              <span>{{dateTypeTime(detail.fromTime,'周')}}</span>
                          </div>
                          <div class="air-right-detail">
                            <div class="air-surplus">
                              <span>剩余仓位</span>
                              <a-progress :format="percent => `${percent}%`" strokeLinecap="square" :percent="chaNum(detail.airSpaceSurplus,detail.airSpaceTotal)" />
                              <span>可用</span>
                            </div>
                              <div class="air-company-road">
                              <div class="air-fly">
                                  <img src="../.././static/img/index/airIcon.png" alt="" />
                              </div>
                              <!-- 航空信息 -->
                              <div class="air-comany-name">
                                <span>{{detail.transTypeName}}</span>
                                <span>{{detail.airModelValue}}</span>
                              </div>
                              <!-- 线路中转 -->
                              <div class="air-road-change">
                                <!-- 出发地 -->
                                <div class="air-start-place">
                                  <span>{{dateTypeTime(detail.fromTime,'HH:MM') }}</span>
                                  <span>{{detail.fromAirPortName}}</span>
                                </div>
                                <div class="air-line">
                                   <div class="air-transfer" v-if="detail.airTransfer == 0">
                                    直达
                                  </div>
                                  <div class="air-transfer" v-if="detail.airTransfer == 1">
                                    中转(杭州)
                                  </div>
                                  <div class="air-line-pic">
                                     <img src="../.././static/img/index/roadLine.png" alt="" />
                                  </div>
                                  <div class="air-arrive-time">
                                    抵达时间：{{dateTimeChang(detail.fromTime,detail.toTime)}}
                                  </div>
                                </div>
                                <!-- 到达地 -->
                                <div class="air-end-place">
                                  <span>{{dateTypeTime(detail.toTime,'HH:MM') }}</span>
                                  <span>{{detail.toAirPortName}}</span>
                                </div>
                              </div>
                              <!-- 机票价格 -->
                              <div class="air-price">￥<i class="orange">{{detail.transPriceDisplay}}</i>元</div>

                            </div>
                          </div>
                    </div>
                    <div class="high-banner-box"  v-if="detail.lineType !=3">
                        <div class='high-banner-change'>
                          <!-- <page-carousel v-if="detail.lineType == 1"  :carouselList="carouselList"></page-carousel> -->
                         <img :src="FileUploadUrl2+company.companyPath+company.companyPic">
                          <!-- <img v-if="detail.lineType == 3" style="width: 100%;height: 100%;" src="./../../static/img/transport/airban.png">
                          <img v-if="detail.lineType == 4" style="width: 100%;height: 100%;" src="./../../static/img/transport/seaBan.png"> -->
                        </div>
                        <!-- 公路运输 -->
                        <div v-if="detail.lineType == 1" class="high-detail">
                            <p>出发地:<span>{{detail.beginPlace}}</span></p>
                            <p>到达地:<span>{{detail.endPlace}}</span></p>
                            <p>运输类型:<span>{{detail.transTypeName}}</span></p>
                            <p>车辆类型:<span>{{detail.carTypeName}}</span></p>
                            <p v-if="detail.transTypeName === '零担'">
                              重货价:<span><i class="orange">{{detail.weightPriceDisplay}}</i><i>{{detail.weightPriceUnitValue}}</i><a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a>
                               </span>
                            </p>
                            <p v-if="detail.transTypeName === '零担'">轻货价:<span><i class="orange">{{detail.volumePriceDisplay}}</i>元/立方米</span><a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></p>
                            <p v-if="detail.transTypeName != '零担'">
															运价:
                              <!-- <span v-if="detail.transPriceDisplay"><i class="orange">{{detail.transPriceDisplay}}</i>元起/车</span> -->
															<span v-if="detail.transPriceDisplay"><i class="orange">{{detail.transPriceDisplay}}</i>元起/车</span>
															<span v-if="!detail.transPriceDisplay">面议</span>
															</p>
                            <p>有效期:
                              <span v-if="detail.longValid == 0">{{detail.validDay}}天</span>
                              <span v-if="detail.longValid == 1">长期有效</span>
                            </p>
                        </div>
                        <!-- 铁路运输 -->
                        <div v-if="detail.lineType == 2" class="high-detail">
                            <p>出发地:<span>{{detail.beginPlace}}</span></p>
                            <p>到达地:<span>{{detail.endPlace}}</span></p>
                            <p>运输类型:<span>{{detail.transTypeName}}</span></p>
                            <p>重货价:<span><i class="orange">{{detail.weightPriceDisplay}}</i><i>{{detail.weightPriceUnitValue}}</i></span></p>
                            <p>轻货价:<span><i class="orange">{{detail.volumePriceDisplay}}</i>元/立方米</span></p>
                            <p>有效期:
                                <span v-if="detail.longValid == 0">{{detail.validDay}}天</span>
                                <span v-if="detail.longValid == 1">长期有效</span>
                           </p>
                        </div>
                        <!-- 航空运输 -->
                     <!--    <div v-if="detail.lineType == 3" class="high-detail">
                           <p>出发地:<span>{{detail.fromProvince}}{{detail.fromCity}}</span></p>
                           <p>到达地:<span>{{detail.toProvince}}{{detail.toCity}}</span></p>
                           <p>是否中转:<span>否</span></p>
                           <div class="p-1em">运价(元):
                              <table>
                                  <thead>
                                     <th>Min</th>
                                     <th>+45</th>
                                     <th>+100</th>
                                     <th>+300</th>
                                     <th>+500</th>
                                     <th>+1000</th>
                                  </thead>
                                  <tbody>
                                     <tr>
                                      <td>{{detail.price_min}}</td>
                                      <td>{{detail.price_50}}</td>
                                      <td>{{detail.price_100}}</td>
                                      <td>{{detail.price_300}}</td>
                                      <td>{{detail.price_500}}</td>
                                      <td>{{detail.price_1000}}</td>
                                     </tr>
                                  </tbody>
                              </table>
                           </div>
                           <p>有效期:<span>3天</span></p>
                        </div> -->
                        <!-- 海路运输-拼箱详情 -->
                        <div v-if="detail.lineType == 4 && detail.transType == 38"  class="high-detail">
                           <p>出发地:<span>{{detail.beginPlace}}</span></p>
                           <p>到达地:<span>{{detail.endPlace}}</span></p>
                           <p>运输类型:<span>海运拼箱</span></p>
                           <div class="p-1em">运价(元):
                              <div>
                                <p><i class="orange">1800</i>元/吨</p>
                                <p><i class="orange">30</i>元/立方米</p>
                              </div>
                           </div>
                          <p>有效期:
                                <span v-if="detail.longValid == 0">{{detail.validDay}}天</span>
                                <span v-if="detail.longValid == 1">长期有效</span>
                          </p>
                        </div>
                        <!-- 海路运输-海运散杂 -->
                        <div v-if="detail.lineType == 4 && detail.transType == 39"  class="high-detail">
                           <p>出发地:<span>{{detail.beginPlace}}</span></p>
                           <p>到达地:<span>{{detail.endPlace}}</span></p>
                           <p>运输类型:<span>海运散杂</span></p>
                           <p>货物类型:<span>大宗散货</span></p>
                           <p>船舶类型:<span>普通干货船</span></p>
                           <p>轻货价:<span><i class="orange">300</i>元/一吨</span></p>
                           <p>有效期:
                                <span v-if="detail.longValid == 0">{{detail.validDay}}天</span>
                                <span v-if="detail.longValid == 1">长期有效</span>
                           </p>
                        </div>
                        <!-- 海路运输-海运整箱 -->
                        <div v-if="detail.lineType == 4 && detail.transType == 37"  class="high-detail">
                           <p>出发地:<span>{{detail.beginPlace}}</span></p>
                           <p>到达地:<span>{{detail.endPlace}}</span></p>
                           <p>运输类型:<span>海运整箱</span></p>
                           <div  class="p-1em">运价(元):
                              <table>
                                  <thead>
                                     <th>20’</th>
                                     <th>40’</th>
                                     <th>40HQ</th>
                                     <th>45’</th>
                                  </thead>
                                  <tbody>
                                     <tr>
                                       <!-- <td class="orange">{{detail.price_20}}</td>
                                       <td class="orange">{{detail.price_40}}</td>
                                       <td class="orange">{{detail.price_40HQ}}</td>
                                       <td class="orange">{{detail.price_45}}</td> -->
                                       <td class="orange">{{parseInt( detail.airSeaPrice.split('20‘-')[1])||''}}</td>
                                       <td class="orange">{{parseInt( detail.airSeaPrice.split('40‘-')[1])||''}}</td>
                                       <td class="orange">{{parseInt( detail.airSeaPrice.split('40HQ-')[1])||''}}</td>
                                       <td class="orange">{{parseInt( detail.airSeaPrice.split('45‘-')[1])||''}}</td>
                                     </tr>
                                  </tbody>
                              </table>
                            </div>
                            <p>有效期:
                                  <span v-if="detail.longValid == 0">{{detail.validDay}}天</span>
                                  <span v-if="detail.longValid == 1">长期有效</span>
                            </p>
                        </div>
                    </div>
                  <!-- 数据展示 -->
                  <div class="tend-list tender-list-detail" style="margin-top:35px;">
                      <div class="ant-list ant-list-vertical ant-list-lg ant-list-split">
                        <div class="ant-spin-nested-loading">
                          <div class="ant-spin-container">
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">出发地</div>
                                <div class="Infor-cont  wy-text-nowrap">{{detail.beginPlace}}</div></div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">到达地</div>
                                <div class="Infor-cont  wy-text-nowrap">{{detail.endPlace}}</div></div>
                            </div>
                            <!-- <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">网点名称</div>
                                <div class="Infor-cont wy-text-nowrap">{{detail.fromSite||'暂无'}}</div></div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">网点名称</div>
                                <div class="Infor-cont wy-text-nowrap">{{detail.toSite||'暂无'}}</div></div>
                            </div> -->
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">联系人</div>
                                <div class="Infor-cont">{{detail.fromLinkMan || '暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                                <!-- <div class="Infor-cont" v-if="loggedIn">{{detail.fromLinkMan || '暂无'}}</div>
                                <div class="Infor-cont" v-if="!loggedIn">登录后可查看</div> -->
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                  <div class="Infor-title">联系人</div>
                                  <div class="Infor-cont">{{detail.toLinkMan || '暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                                  <!-- <div class="Infor-cont" v-if="loggedIn">{{detail.toLinkMan || '暂无'}}</div>
                                  <div class="Infor-cont" v-if="!loggedIn">登录后可查看</div> -->
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">手机号</div>
                                <div class="Infor-cont">{{detail.fromLinkMobile || '暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                              <!--   <div class="Infor-cont" v-if="loggedIn">{{detail.fromLinkMobile || '暂无'}}</div>
                                <div class="Infor-cont" v-if="!loggedIn">登录后可查看</div> -->
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">手机号</div>
                                <div class="Infor-cont">{{detail.toLinkMobile || '暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                               <!--  <div class="Infor-cont" v-if="loggedIn">{{detail.toLinkMobile || '暂无'}}</div>
                                <div class="Infor-cont" v-if="!loggedIn">登录后可查看</div> -->
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">QQ号</div>
                                <!-- <div class="Infor-cont">{{detail.fromLinkQq||'暂无'}}</div></div> -->
                                <div class="Infor-cont">{{detail.fromLinkQq||'暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">QQ号</div>
                                <!-- <div class="Infor-cont">{{detail.toLinkQq||'暂无'}}</div></div> -->
                                <div class="Infor-cont">{{detail.toLinkQq||'暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">传真</div>
                                <!-- <div class="Infor-cont wy-text-nowrap">{{detail.fromLinkFax||'暂无'}}</div></div> -->
                                <div class="Infor-cont wy-text-nowrap">{{detail.fromLinkFax||'暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">传真</div>
                                <!-- <div class="Infor-cont wy-text-nowrap">{{detail.toLinkFax||'暂无'}}</div></div> -->
                                <div class="Infor-cont wy-text-nowrap">{{detail.toLinkFax||'暂无'}}<a href="/login" style="margin-left: 10px" v-if="!loggedIn">登录查看</a></div>
                              </div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">地址</div>
                                <div class="Infor-cont wy-text-nowrap">{{detail.fromLinkAddress}}</div></div>
                            </div>
                            <div class="ant-list-item">
                              <div class="ant-list-item-content ant-list-item-content-single">
                                <div class="Infor-title">地址</div>
                                <div class="Infor-cont wy-text-nowrap">{{detail.toLinkAddress}}</div></div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="highway-tips">
                          <img src="./../../static/img/index/tips.png">
                          <span>温馨提示：联系我时，请说明是从云南国际物流云上看到的信息，谢谢</span>
                      </div>
                  </div>
                    <!-- 公路 -->
                   <div class="tender-company-profile"  v-if="detail.lineType != 2">
                        <div class="tnder-main-title">线路介绍</div>
                        <div class="company-profile-content">
                            <p>{{detail.description || '暂无'}}</p>
                        </div>
                  </div>
                  <!-- 公司简介 -->
                  <div class="tender-company-profile">
                        <div class="tnder-main-title">公司简介
                            <nuxt-link :to="`/corp`">进入企业主页</nuxt-link>
                        </div>
                        <div class="company-profile-content">
                            <p>{{company.companyBriefRemark || '暂无'}}</p>
                            <div class="consultationBtn">
                                  <a-button v-if="loggedIn&&loggedUser.attestationStatus==111" type="primary" @click="elasticShowModal(detail.userId)">立即沟通</a-button>
                                  <a-button v-if="loggedIn&&loggedUser.attestationStatus!=111" type="primary" @click="TipsShowModal(detail.userId)">立即沟通</a-button>
                                  <router-link v-if="!loggedIn" to="/login">
                                      <a-button type="primary">立即沟通</a-button>
                                  </router-link>
                            </div>
                           
                        </div>
                  </div>
                </div>
                <div class="tender-concat">
                    <div class="tnder-main-title">联系方式</div>
                    <div class="concat-content">
                        <h3>{{company.company || '暂无'}}</h3>
                        <div v-if="company.starLevel">
                            <span>用户星级</span>
                            <a-rate :defaultValue="company.starLevel" disabled allowHalf />
                        </div>
                    </div>
                    <div class="concat-renzhen">{{company.attestationStatusValue}}</div>
                   <!--  <div class="concat-renzhen" v-if="company.attestationStatus == 0">未认证</div>
                    <div class="concat-renzhen" v-if="company.attestationStatus == 1">认证中</div>
                    <div class="concat-renzhen" v-if="company.attestationStatus == 2">认证成功</div>
                    <div class="concat-renzhen" v-if="company.attestationStatus == 3">认证失败</div> -->
                    <!-- 分割线 -->
                    <div class="concat-line"></div>
                    <p>公司地址：{{company.companyAddress || '暂无'}}</p>
                    <p>详细地址：{{company.detailAddress || '暂无'}}</p>
                    <p>成立时间：{{company.companyCreateTime&&company.companyCreateTime.split(' ')[0]}}</p>
                    <p>联系人：{{company.legalPerson || '暂无'}}</p>
                    <div class="otehr-product-information">
                      <div v-if="detail.lineType == 1">
                        <div class="tnder-main-title">公司其他公路信息</div>
                        <div>
                            <ul >
                             <li v-for="(item,index) in details" :key="index">
                                <nuxt-link :to="`./${item.lineId}`">
                                  <div class="other-pic">
                                     <img :src="FileUploadUrl2+item.companyPic">
                                  </div>
                                  <div class="other-val">{{item.fromCity}}-{{item.toCity}}</div>
                                </nuxt-link>
                              </li>
                           </ul>
                        </div>
                      </div>
                      <div v-if="detail.lineType == 2">
                        <div class="tnder-main-title">公司其他铁路信息</div>
                        <div>
                            <ul >
                                <li v-for="(item,index) in details" :key="index">
                                <nuxt-link :to="`./${item.lineId}`">
                                  <div class="other-pic">
                                     <img :src="FileUploadUrl2+item.companyPic">
                                  </div>
                                  <div class="other-val">{{item.fromCity}}-{{item.toCity}}</div>
                                </nuxt-link>
                              </li>
                           </ul>
                        </div>
                      </div>
                      <div v-if="detail.lineType == 3">
                        <div class="tnder-main-title">公司其他航空信息</div>
                        <div>
                            <ul>
                                <li v-for="(item,index) in details" :key="index">
                                <nuxt-link :to="`./${item.lineId}`">
                                  <div class="other-pic">
                                     <img :src="FileUploadUrl2+item.companyPic">
                                  </div>
                                  <div class="other-val">{{item.fromCity}}-{{item.toCity}}</div>
                                </nuxt-link>
                              </li>
                           </ul>
                        </div>
                      </div>
                      <div v-if="detail.lineType == 4">
                        <div class="tnder-main-title">公司其他海路信息</div>
                        <div>
                            <ul>
                                <li v-for="(item,index) in details" :key="index">
                                <nuxt-link :to="`./${item.lineId}`">
                                  <div class="other-pic">
                                     <img :src="FileUploadUrl2+item.companyPic">
                                  </div>
                                  <div class="other-val">{{item.fromCity}}-{{item.toCity}}</div>
                                </nuxt-link>
                              </li>
                           </ul>
                        </div>
                      </div>
                        
                  </div>
               </div>
          </div>
      <!-- 登录后留言板弹框 -->
      <Elastic :userId="detail.userId" ref='elastic'></Elastic>
       <!-- 提示认证弹框 -->
      <Elastics  ref='elastics'></Elastics>
  </div>
</template>

<script>
import PageCarousel from './../../components/ui/PageCarousel';
import Elastic from './../../components/dialog/Elastic'
import Elastics from '@/components/dialog/Elastics'
import { environment } from './../../server/environment'
import AuthMixin from '~/mixins/auth'
export default {
  mixins: [ AuthMixin ],
  components: {
    PageCarousel,
    Elastic,
    Elastics,
  },
  async asyncData ({ app, $axios, params, query, error }) {
      const returnData = {}
      const id = params.id
      try {
          const { data } = await $axios.$get('/api/info/line/open/getLineById/'+id, { params: {} })
          returnData.detail = data;
      } catch (err) {
          return error({ statusCode: err.code, msg: err.msg })
      }
      return returnData
  },
  data () {
    return {
      detail : {},
      details: {},
      // 企业信息
      company: {},
      FileUploadUrl2:environment.FileUploadUrl2,
      carouselList: [
        require('./../../static/img/transport/avabanner.png'),
        require('./../../static/img/transport/avaBannerFirst.png'),
        require('./../../static/img/transport/avaBannerSecond.png')
      ],
      formLayout: 'horizontal',
      form: this.$form.createForm(this),
    }
  },
  created:function(){
     if (this.detail.userId){
        this.lineOtherById(this.detail.userId,this.detail.lineType);
        this.concatUserID(this.detail.userId);
      }
     const id = this.$route.params.id
  },
  watch:{
      '$route':function(){
        if(this.detail.userId){
          this.lineOtherById(this.detail.userId,this.detail.lineType);
          this.concatUserID(this.detail.userId);
        }
      }
  },
  methods: {
    // 线路类型返回文本
    lineTypeText (type) {
      let str = '';
      switch (type) {
        case 1: str = '公路运输'; break;
        case 2: str = '铁路运输'; break;
        case 3: str = '航空运输'; break;
        case 4: str = '海路运输'; break;
      }
      return str;
    },
    // 字典表接口 
    async infoCommonDict (type) {
        const res = await this.$store.dispatch('infoCommonDict',{
          dictType: type
        })
        if (res.status) {
          // switch(type){
          //   case 11: this.highwayList = res.data.rows; break;
          //   case 12: this.railwayList = res.data.rows; break;
          //   case 13: this.airlineList= res.data.rows; break;
          //   case 14: this.seawayList = res.data.rows; break;
          // }
        } 
    },
    // 获取线路列表
    async lineById (id) {
        const res = await this.$store.dispatch('info/lineById',id)
          console.log('datail:11',res);

        if (res.status) {
          let d = res.data;
          if (d.airSeaPrice) {
            if (d.lineType ==4){
              d['price_20'] = parseInt( d.airSeaPrice.split('20‘-')[1])||''
              d['price_40'] = parseInt( d.airSeaPrice.split('|40‘-')[1])||''
              d['price_40HQ'] = parseInt( d.airSeaPrice.split('|40HQ-')[1])||''
              d['price_45'] = parseInt( d.airSeaPrice.split('|45‘-')[1])||''
              d.lineCycle = this.lineCycleReset(d.lineCycle)
            }
            // if (d.lineType ==3){
            //   d['price_min'] = parseInt( d.airSeaPrice.split('MIN-')[1])||''
            //   d['price_45'] = parseInt( d.airSeaPrice.split('+45-')[1])||''
            //   d['price_100'] = parseInt( d.airSeaPrice.split('+100-')[1])||''
            //   d['price_300'] = parseInt( d.airSeaPrice.split('+300-')[1])||''
            //   d['price_500'] = parseInt( d.airSeaPrice.split('+500-')[1])||''
            //   d['price_1000'] = parseInt( d.airSeaPrice.split('+1000-')[1])||''
            // }
          }
          this.detail = d;
          console.log(this.detail,1111111)
          this.concatUserID(d.userId)
        } 
    },
    //公司其他产品信息
    async lineOtherById (id,type) {
          const res = await this.$store.dispatch('info/lineOtherById',{
            companyId: id,
            lineType: type
          })
          if (res.status) {
            this.details = res.data.rows;
          } 
      },
    // 获取企业基本信息
    async concatUserID (id) {
        const res = await this.$store.dispatch('info/concatUserID',id)
        console.log('222222:',res)
        // if (res.status) {
          this.company = res;
          // this.starLevel = res.starLevel;
        // } 
    },
    // 显示留言板
    elasticShowModal(id){
      this.$refs.elastic.showModal(id);
    },
    // 未认证弹窗
    TipsShowModal(id){
      this.$refs.elastics.warning(id);
    },
      // 时分 
      dateTypeTime(time,type) {
        if (time){
          time = time.replace(/-/g,'/');
          if(type == 'HH:MM'){
            let h = new Date(time).getHours()
            let f = new Date(time).getMinutes()
            return (h<9?'0':'')+h+':'+ (f<9?'0':'')+f
          }
          if(type == 'MM:DD'){
            let m = new Date(time).getMonth()+1
            let d = new Date(time).getDate()
            return (m<9?'0':'')+m+':'+ (d<9?'0':'')+d
          }
          if(type == '周'){
            let day = new Date(time).getDay(),text = "";
            switch (day) {
              case 0: text = "星期日"; break;
              case 1: text = "星期一"; break;
              case 2: text = "星期二"; break;
              case 3: text = "星期三"; break;
              case 4: text = "星期四"; break;
              case 5: text = "星期五"; break;
              case 6: text = "星期六"; break;
            }
            return text
          }
        }
        return ''
      },
      // 百分比
      chaNum (min,max) {
        let num = (min/max)*100;
        if (num>100) num = 100
        return parseInt(num) || 0
      },
      // 两时间差 时分
      dateTimeChang (min,max){
        if (min && max){
          min = min.replace(/-/g,'/');
          max = max.replace(/-/g,'/');
          let time = new Date(max).getTime()-new Date(min).getTime()
          let h = parseInt(time/3600000)
          let f = parseInt((time%3600000)/1000/60)
          return (h<9&h>0?'0':'')+h+'小时'+(f<9&f>0?'0':'')+f+'分'
        }
        return ''
      },
  }
}
</script>
<style lang="scss">
@import "./../../assets/css/transport/highwayDetail.scss";
.p-1em{
  margin-bottom: 1em;
}
.tender-detail{
  .air-content{
      width: 748px;
      height: 140px;
      float: none;
      margin-top: 20px;
      overflow: hidden;
      border: 1px solid #DEDEDE;
      .air-left-time{
        width: 60px;
        height: 140px;
        border-right: 1px solid #DEDEDE;
        background: #EEF8F7;
        line-height: 30px;
        text-align: center;
        font-size: 14px;
        color: #15837A;
        padding-top: 40px;
        float: left;
        span{
          display: block;
        }
      }
  }
  .air-right-detail{
     width: 686px;
     float: left;
     .air-surplus{
        width: 600px;
        margin: 0 auto;
        margin-top: 20px;
       //margin-left: 35px;
     }
     .ant-progress{
        width: 437px;
        margin-left: 20px;
        vertical-align: middle;
        margin-top: -8px;
     }
  }
  .ant-progress-inner{
      background-color: #FE4040;
  }
  .ant-progress-bg{
      background-color: #FFDFDF;
      border-radius: 0 10px 10px 0 !important;
      float: right;
  }
  .air-company-road{
    margin-top: 10px;
    .air-fly{
       width: 20px;
       height: 15px;
       float: left;
       margin-left: 14px;
       margin-top: 10px;
       img{
          width: 100%;
          height: 100%;
          vertical-align: middle;
       }
    }
  //航空信息
    .air-comany-name{
        width: 56px;
        text-align: center;
        float: left;
        margin: 10px 6px 0 4px;
        span{
          display: block;
          font-size: 14px;
        }
        span:first-child{
           color: #333333;
        }
        span:last-child{
            color: #666666;
        }
    }
      //线路中转
    .air-road-change{
      float: left;
      width: 488px;
      text-align: center;
      .air-start-place{
				width: 130px;
        float: left;
        // margin-right: 15px;
        // margin-left: 15px;
        span{
           display: block;
           color: #15837A;
        }
        span:first-child{
            font-size: 20px;
        }
         span:last-child{
            font-size: 16px;
        }
      }
      .air-line{
        float: left;
        color: #666666;
        font-size: 14px;
        .air-line-pic{
           width: 200px;
           height: 16px;
           position: relative;
           img{
               width: 100%;
               height: 100%;
               position: absolute;
               left: 0;
               top: 50%;
               margin-top: -8px;
           }
        }
        .air-arrive-time{
            margin-top: 10px;
        }
      }

    }
    //到达
    .air-end-place{
        float: left;
				width: 130px;
        margin-left: 15px;
        span{
           display: block;
           color: #15837A;
        }
        span:first-child{
            font-size: 20px;
        }
         span:last-child{
            font-size: 16px;
        }
    }
    .air-price{
        text-align: center;
        font-size: 14px;
        float: left;
        .orange{
            font-size: 24px;
            color: #FEB72D;
        }
        span{
           color: #000000;
        }
  }


  }

}
</style>